#region Using
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
#endregion Using

namespace CY.GFive.Core.Business
{
	public class UserRole : Business.BusinessBase<UserRole, int>
	{
		#region Fields and Properties

		private int userType = 0;
		/// <summary>
		/// 
		/// </summary>
		public int UserType
		{
			get { return userType; }
			set
			{
				if (value != userType)
				{
					MarkChanged("UserType");
					userType = value;
				}
			}
		}

		private int userKey = 0;
		/// <summary>
		/// 
		/// </summary>
		public int UserKey
		{
			get { return userKey; }
			set
			{
				if (value != userKey)
				{
					MarkChanged("UserKey");
					userKey = value;
				}
			}
		}

		private int roleKey = 0;
		/// <summary>
		/// 
		/// </summary>
		public int RoleKey
		{
			get { return roleKey; }
			set
			{
				if (value != roleKey)
				{
					MarkChanged("RoleKey");
					roleKey = value;
				}
			}
		}

		#endregion Fields and Properties

		#region Constructors

		public UserRole()
		{
		}

		#endregion Constructors

		#region Base overrides

		protected override void ValidationRules()
		{
		}

		protected override UserRole DataSelect(int id)
		{
			return Services.DALService.UserRoleService.Select(id);
		}

		protected override void DataUpdate()
		{
			Services.DALService.UserRoleService.Update(this);
		}

		protected override void DataInsert()
		{
			Services.DALService.UserRoleService.Insert(this);
		}

		protected override void DataDelete()
		{
			Services.DALService.UserRoleService.Delete(this);
		}

		#endregion Base overrides
	}
}
